package com.personnalManagerSystem;


import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;


/**
 * @Author liqing
 * @Date: 2022/3/22 20:16
 * @Description
 */
/*
本注解表明当前项目是一个springboot工程,这是一个启动类,也是应用程序的入口类
启动类需要放置在根目录之下,用以扫描controller,service,mapper等一些相关的插件
 */
@SpringBootApplication
@MapperScan("com.personnalManagerSystem.mapper")
public class PersonnalManagerSystemApplication {
    //日志优化
    private static final Logger log = LoggerFactory.getLogger(PersonnalManagerSystemApplication.class);
    public static void main(String[] args) {
        //原始配置
        //SpringBootApplication.run(PersonnalManagerSystemApplication.class,args);
        //启动日志优化
        SpringApplication application = new SpringApplication(PersonnalManagerSystemApplication.class);
        ConfigurableApplicationContext applicationContext = application.run(args);
        Environment env = applicationContext.getEnvironment();
        log.info("启慧人事管理系统启动成功");
        log.info("地址:\thttp://localhost:{}",env.getProperty("server.port"));
    }
}













